package com.example.udpDemo.socket.design.builder;

import java.math.BigDecimal;

/**
 * @author wangdachuan
 * @version 1.0
 * @date 2023/3/31 21:02
 **/
public class PhoneMaker {

    private PhoneBuilder builder;

    /**
     * 手机制造商
     *
     * @param builder 构建器
     */
    public PhoneMaker(PhoneBuilder builder) {
        this.builder = builder;
    }

    /**
     * 打电话
     *
     * @param brand  品牌
     * @param model  模型
     * @param memory 内存
     * @param price  价格
     */
    public void makePhone(String brand, String model, int memory, BigDecimal price) {
        builder.buildBrand(brand);
        builder.buildModel(model);
        builder.buildMemory(memory);
        builder.buildPrice(price);
    }

}
